package org.openea.eap.module.obpm.model.form;

import org.openbpm.base.api.constant.BaseStatusCode;









public class ValidateException
  extends RuntimeException
{
  private static final long serialVersionUID = 6886989804271711420L;
  private String errorCode;
  private String errorMsg;

  public ValidateException(String errorCode, String errorMsg) {
    super(String.format("[%s]%s", new Object[] { errorCode, errorMsg }));
    this.errorCode = errorCode;
    this.errorMsg = errorMsg;
  }

  public ValidateException(Integer errorCode, String errorMsg) {
    super(String.format("[%s]%s", new Object[] { errorCode, errorMsg }));
    this.errorCode = errorCode + "";
    this.errorMsg = errorMsg;
  }

  public ValidateException(String errorMsg) {
    super(String.format("[%s]%s", new Object[] { BaseStatusCode.PARAM_ILLEGAL, errorMsg }));
    this.errorCode += "";
    this.errorMsg = errorMsg;
  }


  public ValidateException(String errorCode, String errorMsg, Throwable cause) { super(cause); }



  public String getErrorCode() { return this.errorCode; }



  public void setErrorCode(String errorCode) { this.errorCode = errorCode; }



  public String getErrorMsg() { return this.errorMsg; }



  public void setErrorMsg(String errorMsg) { this.errorMsg = errorMsg; }
}
